﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace FourSquareNETCFLibrary
{
    public class mayor
    {
        private string _type;
        private string _checkins;
        private user _user;
        private string _message;
        
        public mayor(XmlNode Xml)
        {
            XmlNodeList xnl = Xml.ChildNodes;
            foreach (XmlNode xn in xnl)
            {
                switch (xn.Name)
                {
                    case "type":
                        this._type = xn.InnerText;
                        break;
                    case "user":
                        this._user = new user(xn);
                        break;
                    case "checkins":
                        this._checkins = xn.InnerText;
                        break;
                    case "message":
                        this._message = xn.InnerText;
                        break;
                }
            }
        }

        public string Type
        {
            get
            {
                return _type;
            }
        }

        public string Checkins
        {
            get
            {
                return _checkins;
            }
        }

        public user User
        {
            get
            {
                return _user;
            }
        }

        public string Message
        {
            get
            {
                return _message;
            }
        }
    }
}
